home *** CD-ROM | disk | FTP | other *** search
- Two Column Printer, Release 6 1/94
- by Jonathan Corey
-
- Distribution:
- FREEWARE - Please include documentation and printer drivers
- with any copies you give out.
-
- Language:
- GFA BASIC 3.5E
-
- New stuff in Release 6:
- The file README_6.TXT describes new features and enhancements
- in this release. The major one is the user interface which has
- been "GEMized" to allow better multitasking operation and
- greater flexibility.
-
- New users:
- Read the "Introduction" section and then the "Getting Started"
- section below.
-
- Old users:
- The readme file should be enough to get you going.
-
-
- -=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=-
-
-
- INTRODUCTION
-
- * What does it do?
-
- TWO COLUMN PRINTER prints text files (ASCII) in a two column "magazine
- style" format. This saves paper and makes long listings much easier to
- refer to. To save even more paper, it has an option that simplifies two
- sided printing, even on continuous form paper.
-
- TWO COLUMN PRINTER works very well with program documentation, source
- code listings, bulletin board captures, and "online" magazines. It's not
- designed to do fancy "desktop publishing" work.
-
-
- * What kind of files does it print?
-
- ASCII text files. Basically, these are files that are readable when
- displayed by the Desktop SHOW option. TWO COLUMN PRINTER will warn you if
- you try to print the wrong kind of file.
-
- There are several variations in the way text files end lines. Release 6
- can handle the following: carriage-return/line-feed (Atari & IBM), line-
- feed/ carriage-return, line-feed only (unix), carriage-return only
- (Apple), and those that don't have any of these in the middle of
- paragraphs.
-
-
- * Will it work with my printer?
-
- That's likely. One of the drivers supplied with the program will work if
- your printer is Epson compatible (FX or LQ), is a DeskJet, or can emulate
- a HP LaserJet II. Instructions for writing a driver for other printers
- are included in this file. It's not difficult.
-
- Ideally, your printer should be able to print at least 20 characters per
- inch (CPI) to get the most out of TWO COLUMN PRINTER. Standard printer
- output is usually at 10 or 12 CPI. So called "compressed" print is 17
- CPI. Compressed type works fairly well but being able to go to 20 CPI
- gives better results with many files. Not all printers can do this.
-
- IMPORTANT: Some printers (such as the Panasonic KX-P1091i and KX-P1191)
- have control panel settings that cannot be changed by software. TWO
- COLUMN PRINTER will not function properly unless they are set to a
- programmable mode (the Panasonic KX-P1091i calls this "Std Pgm", the
- KX-P1191 calls it just "Pgm").
-
-
- * What resolutions does it run in?
-
- All of them (ST/TT/Falcon and non-standard) as far as I know. I do not
- have the hardware to test all possible displays, let me know if you find
- any that do not work. Don't use a resolution that shows less than 80
- columns of text (e.g. ST low resolution) unless you are familiar with the
- program since most of its help screens won't be readable.
-
-
- * What are its memory requirements?
-
- Release 6 uses between 260k and 330k bytes plus either enough RAM or disk
- space for a work buffer. The buffer ranges from about 20% larger than the
- print file to as much as 75% larger than it. The bigger one is used with
- files that have tabs in them.
-
- When TWO COLUMN PRINTER gets over 300k bytes to work with it can do
- printouts that require as many as 30,000 lines. With less than that it
- can do up to 15,000 line printouts.
-
-
- * Where can I send comments, questions, bug reports, or thousands
- of dollars?
-
- For electronic mail, my GEnie address is JWC-OEO.
-
- For the other kind, write to: Self-Styled Software, 321 J Street, Sparks
- NV 89431.
-
- TWO COLUMN PRINTER is free. No payment is requested.
-
-
- -=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=-
-
-
- GETTING STARTED
-
- The first hurdle for new users is the printer driver (see "Will it work
- with my printer?" in the introduction section above). You can start
- 2COLUMNS.PRG and check out its drop down menu items but you cannot load a
- file until after you choose a printer driver. Don't worry about "config
- files" for now.
-
- Several printer drivers are available. One of them should work well for
- you if your printer is "Epson compatible", a HP Deskjet, or a laser that
- can emulate a HP LaserJet II. If not, you'll have to do some editing.
- See the "Printer Codes and Drivers" section below for instructions.
-
- All these drivers are set up for printing on 8 1/2 x 11 inch paper. You
- can make a driver for other sizes if you want (see the "Printer Codes and
- Drivers" section below). Make sure you printer is in its "Epson mode" if
- you use an Epson type driver.
-
- Here is a list of printer types and associated drivers. The printer on
- which the driver was developed is listed in parentheses, this does not
- mean it won't work on other similar printers. (Pan = Panasonic)
-
-
- Printer Driver(s) Comments
-
- 9-pin Epson EPSON_FX.DAT Has a 20 CPI font (Epson FX85)
- compatibles KX_P1191.DAT similar, adds 15 CPI font(Pan KXP1191)
- KXP1091I.DAT no 20 CPI font (Pan KX P1091i)
- EPSFX_LC.DAT LC=Long Columns (124 lines) (FX85)
-
- 24-pin Epson EPSON_LQ.DAT Generic LQ driver with 20 CPI font
- compatibles (Epson 1050 & 950)
-
- HP DeskJets DJ_BASIC.DAT Internal 6 & 12 point fonts, pre 500
- DJ_500.DAT similar, has 6 & 12 point Letter
- Gothic fonts as well as Courier
- DJ_GOTHC.DAT 9.5 point font from Ltr Gothic card
- DJ_PE.DAT 10 point font from Prestige Elite card
-
- LaserJet II LJ2BASIC.DAT Internal fonts, mainly 8.5 point "line
- compatibles Printer", (HP LaserJet II)
-
-
- After you load a printer driver, the next step is to run through the items
- in the "Help" drop-down menu. Follow that with some short printouts to
- test your printer driver (start with single sided printouts). Print the
- "Readme" file and after you get that working okay, print this file and
- read them. When you are reasonably satisfied with a printer driver,
- choose the "Merge printer driver" option so it will become the default and
- won't have to be loaded each time you run TWO COLUMN PRINTER.
-
- After you have used TWO COLUMN PRINTER for a while, you'll likely find
- that most of your printing is done with one particular font and one set of
- format and print settings. You can set it up so that these setting are
- the defaults (the ones that first appear in the control dialog). There is
- an item under the "Help" menu that explains how to do this.
-
-
- -=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=-
-
-
- MORE FEATURES, DETAILS, AND SOME TECHNICAL STUFF
-
-
- * Automated Operation (Batch file,TOS,TTP,CLI,Shells)
-
- In addition to running as a full GEM program TWO COLUMN PRINTER also can
- be run as a TTP type program and as a TOS program through a CLI shell.
- There are no prompts for user input when it's used this way, the various
- format and print options are set with a configuration (config) file. The
- "command line" for this needs to be in the following form:
-
- FILE.TXT #config.CFG -R
-
- FILE.TXT - The file you want to print (the drive/full path needs to
- given if it's not the default). Only one file at a time
- can be specified.
-
- #config.CFG - (optional) "#" indicates that the name of a config
- file follows. If no config file is included, 2COLUMNS.PRG
- tries to find a file named "2CL.CFG" by looking first in
- the print file's path and then in the default path. This
- This same routine is followed with config files that don't
- include a path (print file path first, then default path).
-
- -R - (optional) tells 2COLUMNS to return directly to the calling
- program when it's done. The default is to wait for a key
- press.
-
- The "manual paper feed" mode does not work in "automated operation mode"
- and any error or other condition that would generate a request for user
- input in the GEM mode will cause 2COLUMNS-TOS/TTP to terminate.
-
-
- * Binding Width
-
- TWO COLUMN PRINTER tries to offset the margins to the outside of the
- sheets to make room for binding but it can do this only when column
- widths are set smaller than their maximum size.
-
-
- * Blank Sheets of Paper
-
- Your printer may eject a blank sheet of paper at the end of one or both
- sides of a printout. This is caused by a couple of things. The first
- affects both direct and "to disk" type printouts. Two Column Printer
- sends its "initialize printer" code sequence at the end of a printout to
- put your printer back into its startup mode. This results in a form feed
- at the end of a printout with some printers. The second only happens with
- "to disk" printouts that are printed with the desktop "Print" function.
- The desktop "Print" routine used in newer TOS versions (2 or more I think)
- sends a form feed at the end of a printout, older versions do not. Two
- Column Printer does its own ejecting so an extra sheet comes out at the
- end of each side of a printout with these newer TOS version.
-
- Be careful that you don't include these extra blank sheets when printing
- the second side of a two sided printout. Two column printer prints "blank
- page" on sheets that really do belong with a printout but would not
- otherwise have anything on them.
-
-
- * Column Dimensions
-
- TWO COLUMN PRINTER calculates the maximum column WIDTH for each font from
- information supplied in the printer driver (the entry for the number of
- characters that fit on a full line).
-
- The maximum column LENGTH comes directly from the printer driver.
- Printers vary in how close they can print to the top and bottom of a page
- so maximum column length is not a direct function of line spacing and
- paper length. The section on printer codes below explains how to figure
- maximum column lengths for your printer.
-
- Default column dimensions initially are set a little smaller than their
- maximum sizes. With column widths, this is so there will be more room on
- the sheet for binding. With column length this a safety factor to help
- avoid having a column run beyond the bottom of a sheet or having the
- printer loose its grip on the last sheet. The default setting can be
- changed, see the "Default Settings" entry under the "Help" menu item.
-
-
- * Configuration (config) Files
-
- Config files contain all the format and print options currently in effect
- when they were created (see the "Help" menu item in the program). They
- also have all printer codes needed to put your printer into the font that
- was being used at that time. They do not include the NAME of the font
- however, so the box that normally displays the font name will just say
- "From Config" when a config file has been loaded during normal GEM type
- program operation.
-
-
- * Customizing the Default Settings
-
- The "Help" drop down menu has an item that explains how to customize the
- default setting to fit your needs.
-
-
- * File Preview (+ TABs)
-
- Besides letting you confirm you've loaded the file you were supposed to,
- the file viewer lets you see how many blank spaces need to be stripped
- from its left margin (if any) and gives you visual feedback that helps in
- adjusting the tab spacing. It is not meant to be a full featured file
- viewer though (you can't scroll sideways for example and its window is not
- adjustable). TWO COLUMN PRINTER supports true tabs (a tab will cause
- printing to skip to the next tab stop instead of being expanded into a
- fixed number of spaces). Tab spacing is adjustable but only regular tab
- spacing is supported. The file display reflects the current tab setting
- but will not show blank line filtering or left margin shifting.
-
-
- * Fonts
-
- The term "font" here refers to a particular grouping of type face, size,
- pitch, and sometimes line spacing. You can have up to 6 different fonts
- in your printer driver.
-
-
- * Format Method
-
- Sometimes file lines are too long to fit in a column. TWO COLUMN PRINTER
- splits off the part that doesn't fit and moves it to the next line in the
- column when this happens. The "format method" determines exactly where
- this split occurs, if and how it's marked, and whether this runover can be
- combined with the next line in the file. A program "HELP" option explains
- the different format methods and the types of files recommended for each.
-
- Split line marking is done in different ways with each of the three
- different format methods. With the "Source Code" method all split lines
- end with these three characters; ``> . Continuation lines all begin with;
- >`` . With the "Text, No Reformat" method, the ends of split lines are
- not marked unless the splits have to occur in the middle of words; the
- words get hyphenated in this case. Continuation lines begin with a tilde
- (~). If splits fall between numbers instead of letters, a vertical bar
- (|) is used in both places to avoid the possibility of a hyphen being
- mistaken for a minus sign. The "Text, With Reformat" method works the
- same way as "No Reformat" except continuation lines are marked only in
- the "|" case.
-
- The different format methods only come into play when file lines are too
- long to fit a printed column. It is usually best to choose a type size
- that will allow most, if not all, file lines to be printed without
- splitting.
-
-
- * Line Spacing
-
- Line spacing is not set explicitly. The default spacing is usually 7
- lines per inch (LPI); this normally shifts to 6 LPI when a column length
- of less than 61 lines is chosen. Any line spacing codes included as part
- of a font's definition will override these settings. Several fonts that
- come with TWO COLUMN PRINTER use this method to set a spacing of 8 LPI.
-
-
- * Print Options
-
- Manual vs. Automatic/normal vs. Automatic/sorted paper feed
-
- MANUAL FEED: Printing pauses before each page and you get a chance to
- skip each the page. This lets you go back and fix a page or two in a
- printout that may have gotten messed up the first time around without
- having to fully reprint it. Pages always print sequentially even when
- the Two Sided print option was chosen. You cannot print to a disk file
- with manual feed. Manual feed does not work in the automated operation
- mode.
-
- AUTOMATIC FEED (Normal): With single sided printouts, the pages come out
- in order from page 1 to the last. With double sided printouts, the odd
- number pages come out first (side 1) and then the even ones (side 2)
- (first 1,3,5 . . . then 2,4,6 . . . ). The only pause comes between
- sides. Use this with continuous form paper and some automatic cut sheet
- feeders.
-
- AUTOMATIC FEED (Sorted): Like "Normal" except the first side comes out in
- reverse order (...5,3,1 if two sided or ...6,5,4,3,2,1 if single sided).
- This keeps users of HP DeskJets and other printers that stack printed
- pages face up from having to re-sort them top to bottom at the end of
- each side.
-
- Some (most?) laser printers stack their printed sheets face down. Don't
- use the sorted option with single sided printouts with this type of
- printer but sorting helps with two sided printouts. With "sort" you only
- have to turn each sheet over at the end of the second side. Without it,
- you have to do this at the end of each side.
-
- Print To Disk - This is useful when you want to print several files in a
- single session or have one very large one to do. Printing to disk
- creates a file (or files) that can be printed later via the Desktop PRINT
- option (and also can be printed on different model computers). A print
- spooler can be used so the printing can go on while you are doing
- something else. If the file does not print correctly it is usually
- because you used a method that filtered out the control characters (some
- spoolers do this). Front and back sides of two sided printouts go into
- separate files. Be careful not to mix one and two sided printouts in the
- same output file.
-
-
- * Merging Printer Codes with 2COLUMNS.PRG
-
- You will probably want to merge your primary printer driver with your
- copy of 2COLUMNS.PRG (for faster loading and to save default settings).
- Their are a few things that have to be considered before doing this:
-
- 1) None of the items in your printer driver can have more than the maximum
- number of code groups indicated in the printer driver section (unlikely).
-
- 2) Your printer driver can't require any codes that use decimal ASCII
- values of 237, 238, or 240 (very unlikely).
-
- 3) Your copy of 2COLUMNS.PRG cannot have been "packed" or "squished".
- Keep a full sized version of 2COLUMNS.PRG around to use when you want to
- do a merge if you do this to your programs. Merging SHOULD work okay if
- you are using a program like DATAlite or Data Diet because they are
- supposed function in a way that keeps 2COLUMNS.PRG from ever knowing that
- it has been compressed. I don't own these programs and so have not been
- able to test this.
-
-
- * Multiple Printers
-
- Release 6 lets you load printer drivers whenever you want rather than just
- when the program starts. It automatically loads a driver called
- 2COLUMNS.DAT the first time you choose "Load Printer Driver" (under the
- "Setup" menu). This makes it very easy to load the driver for a second
- printer. It puts up a file selector at other times or if it cannot find
- 2COLUMNS.DAT in the same path as 2COLUMNS.PRG. You also could use a
- config file to set things up for alternate printers.
-
-
-
- *************************************************************
- *************** Printer Codes and Drivers ***************
- *************************************************************
-
-
-
- HOW TO MAKE YOUR OWN PRINTER DRIVER
-
- Read the sections on line spacing and column dimensions above if you
- haven't already done so.
-
-
- General Information
-
- You'll need a manual for your printer that includes information on how to
- program it (shows what printer codes it uses). This whole process will be
- much easier and the instructions will make more sense if you start by
- editing an existing driver, even if it's for an unrelated printer.
- Follow its general format exactly. Give your driver a new name and save
- it as a text file when you are done (ASCII format, not in any special
- word processor mode).
-
- The codes for each item and the remarks that follow them must fit on a
- single line. Each line can be up to 255 characters long. The number of
- codes allowed for each item varies. See below.
-
- Use 3 digit decimal ASCII values for printer codes. Separate them with a
- single space and put a comma after the last one. Remarks may follow the
- comma (the comma is mandatory, the remarks are optional). THERE MUST NOT
- BE ANY OTHER COMMAS IN THE DATA SECTION, including in the remarks
- themselves. The "-----CODES AND DEFAULTS----" line must be left intact.
-
- Example: A printer function that requires the code "Escape A" would be
- encoded as:
-
- 027 065, REMARKS
-
- The ASCII value of Escape is 27, A is 65. Again, no commas are allowed
- in the remarks themselves.
-
- If your printer requires ASCII 238, 239, or 240 as code values
- (unlikely), see the section b on merging printer codes above.
-
- Printer functions may require a combination of several codes. In the
- Epson FX driver, the "definition" for type size #2 includes both the
- codes for both compressed type ( 027 015 ) and for wider margins with
- this type size ( 027 081 137 ).
-
-
-
- Line-By-Line Editing Instructions
-
- (*) The number in parentheses following each item below is the maximum
- number of code groups allowed for it. A code group is one three
- character ASCII value ( "027 081 137 009" would count as 4 ). These
- limits only apply to codes that will be merged with the program.
-
-
- Default Option Lines
-
- There are two special lines that you can use to set the defaults for
- various format and print settings. These lines need to come before the
- "--- CODES AND DEFAULTS ---" line and they begin with special characters.
-
- The first of these begins with "$". This line lets you set the maximum
- number of consecutive blank lines that will print, the spacing of tab
- stops, and the default column length. All that's needed here is:
-
- $ MB=x, TS=x, CL=x
-
- "x" is the value you want. MB is the default Max Blank line setting and
- can range from 0-9, TS is the Tab Spacing and can range from 2-9, CL is
- for the default Column Length. Enter the number you want subtracted from
- the maximum column length for each font; range 0-9.
-
- The second line is new to Release 6 and begins with the "@" symbol. It
- looks like this:
-
- @ SORT=*, 2SIDES=*, DRAFT=*, DATE=*, DISK=*, EQUAL=*, EUROPE=*
-
- "*" should be either y or n (yes or no) depending on how you want these
- defaults to be set. Leaving one of these out is the same as setting it to
- no. They can come in any order and can be in caps or lowercase but they
- must be spelled as shown above. If this line is missing then Release 6
- acts like previous releases and gets the defaults for these options from
- the resource file.
-
- Sort=y means use the "Auto Feed - Sorted" paper feed option (see "Print
- Options" above), 2SIDES=y means print on both sides of the paper, DRAFT=y
- means draft mode printing, DATE=y means include the date in the printout
- heading, EQUAL=y means print equal length columns on the last page (as
- opposed to printing the left column first). EUROPE=y means the date on
- the printouts should be in European format (day.month.year instead of
- month/day/year). This is the only place you can set this option but you
- can change all the others while the program is running.
-
-
- Paper-Out Sensor (20)*
-
- The first two entries in the "CODES AND DEFAULTS" section are:
- 1) Disable (turn off) the paper-out sensor, and 2) Enable (turn on) the
- paper-out sensor. If your printer does not allow its paper-out sensor to
- be turned off, just enter a single blank space followed by a comma (see
- the drivers for the HP Deskjet).
-
-
- Line Spacing (20)
-
- Next enter the codes for a line spacing of 7 lines per inch. You may
- find that you can only use a value equivalent to slightly more or
- slightly less than this (7 lines per inch is a spacing of 0.143 inches).
- In this case choose the next smallest value available. For example, the
- Epson-FX definition uses 10/72 (0.139) inch spacing.
-
-
- Printer Initialization (35)
-
- Certain settings have to be in effect before printing begins. These
- initial conditions are: A pitch of 10 characters per inch (CPI); Draft
- print; 6 lines per inch line spacing; and top-of-form reset. These are
- the standard "power up" settings for most printers. TWO COLUMN PRINTER
- sends an "initialize" sequence to ensure that these conditions are met.
- The codes that are needed in this sequence vary somewhat from printer to
- printer and also depend on how you normally have your printer's DIP
- switches and control panel buttons set.
-
- As a minimum, you should include: "Reset Printer" (also called
- "Initialize Printer"); 10 CPI printing; and draft mode.
-
- Unless you have your printer's DIP switch set at 8 lines per inch you
- probably don't need to set 6 lines per inch.
-
- If you use a Super/Sub-script font for one of your type sizes, you also
- need to add the codes to cancel this font to the "initialize printer"
- sequence. The Epson FX driver does this.
-
- There are some other codes in the "initialize" sequence for the Deskjet,
- see the note at the bottom of one of the DJ drivers.
-
-
- Skip-Over-Perforations (20)
-
- Enter the codes to turn OFF your printer's "skip-over-perforations"
- function. TWO COLUMN PRINTER handles page breaks itself. Output will be
- totally messed up if "skip-over-perforations" is not turned off.
-
-
- Fancy Print for the Heading (20)
-
- TWO COLUMN PRINTER puts a heading (usually consisting of the name of the
- file being printed and the current date) on the first printed page. For
- this to print properly you'll need to enter the codes for Double Width
- (expanded/5 CPI) printing here. The heading will not be centered if you
- don't.
-
-
- Enhanced Print (20)
-
- Use either Letter Quality (LQ), Near Letter Quality (NLQ) or double
- strike printing. Ideally, your "enhance print" codes should work with
- all the fonts in your driver. Some printers can't do LQ/NLQ with the
- small type sizes that work best with TWO COLUMN PRINTER.
-
-
- Default Extension
-
- Only files that have this extension show up in the File Selector the first
- time you're prompted for a file to print. This entry must not exceed
- three characters and has to be surrounded by quotes. If you prefer that
- all files are shown, enter "*" or just "" here (don't forget the comma).
-
-
- Number of Type Sizes/fonts
-
- Six is the maximum, there can be fewer. Make sure the number you enter
- here is not larger than the number of fonts in your driver.
-
-
- Entries for Each Font (35 codes allowed for font definitions)
-
- ****==> Proportionally spaced fonts will not work <==****
-
- Name
- The name of each font must not exceed 25 characters. Put whatever
- descriptive information you like here and surround it with quotation
- marks. Like all other entries the name MUST be followed by a comma and
- optional descriptive remarks may follow the comma.
-
- Definition (35)
- This is where you put the codes that actually set the font. You are
- limited to 35 codes if you want to merge this driver with the program.
-
- Width
- The entry for the number of characters that will fit on a full line is
- mandatory. Get this value from your printer manual if possible
- (sometimes given as the maximum value allowed for the right margin). If
- you can't find it there then try 160 for 20 CPI, 136 for 17 CPI, 120 for
- 15 CPI, 96 for 12 CPI, and 80 for 10 CPI. Arithmetically inclined
- individuals will be able to discern a pattern here. These values are for
- narrow carriage printers. If you are using a wide carriage model you
- probably can add a character or two to them.
-
- Length (optional)
- On the next line you may enter a number equal to the maximum column
- length possible with this font (up to 125). This optional entry is useful
- if the font's definition includes a line spacing (say 8 lines per inch),
- if your printer can fit more or cannot reliably get as many lines in a
- column as the default (72 lines), or if you will be using something other
- than 11 inch paper. Like all entries, it must be followed by a comma and
- remarks may follow the comma.
-
-
- Maximum Column Length
-
- How do you know exactly how many lines long that columns can be with YOUR
- printer? This depends on two things. 1) Line spacing, and 2) How close
- to the top and bottom of the page your printer can print.
-
- Included this release is a test file (LPC_TEST) that can help you
- determine this. You can set any column length up to 125 with this file no
- matter what limits are defined in your driver. You must select the
- "Unequal-Column-Length" print option for the test to work. You also must
- use the version of LPC_TEST that came with Release 5 or 6.
-
- You'll probably find that you can't get quite as many lines on cut sheets
- as on continuous form paper since your printer will loose its grip near
- the end of a cut sheet. The last sheet in a two sided printout will be a
- cut sheet so the smaller value may be the best choice.
-
- IMPORTANT: If your printer will not allow its paper-out sensor to be
- deactivated (like the HP Deskjet and Epson LQ-850/1050 series) then you
- MUST choose a value one less than the maximum column length indicated by
- this test.
-
- Columns are too long if the line number at the top of the right column is
- not just one more than the line number at the bottom of the left column.
-
- If you don't want to do this test, use the following values: For the
- program standard line spacing of 7 lines per inch; use 72 lines (this is
- the default). For fonts that use an 8 line per inch spacing; use 82 or 83
- lines.
-